
# The American Viewer: Political Consequences of Entertainment Media
# Eunji Kim and Shawn Patterson Jr 
# American Political Science Review 
# Replication File [Table 1]


library(stargazer)

table1 <- read.csv("table1.csv")

## Table 1, Column 1 Support Trump 

support  <- lm(supporttrump_rsc ~ apprentice + watchtv + enjoyrealitytv + 
                 female + educ4 + income_n +ideo5 + age + trustpoliticians + as.factor(state), 
               data=table1) 

## Table 1, Column 2 Trump believes in his policies

tbelieve <- lm(trumpbelieve ~ apprentice + watchtv + enjoyrealitytv + 
                 female + educ4 + income_n +ideo5 + age + trustpoliticians + as.factor(state), 
               data=table1) 

## Table 1, Column 3 Trump cares about people like me 

tcare  <- lm(trumpcare ~ apprentice + watchtv + enjoyrealitytv + 
               female + educ4 + income_n +ideo5 + age + trustpoliticians + as.factor(state), 
             data=table1) 

## Table 1, Column 4 Do not mind the Access Hollywood tape

hollywood <- lm(accesshollywood ~ apprentice + watchtv + enjoyrealitytv + 
                  female + educ4 + income_n +ideo5 + age + trustpoliticians + as.factor(state), 
                data=table1) 



## Combined results 


stargazer(support, tbelieve, tcare, hollywood,   
          star.cutoffs = c(.05,.01,.001),
          title="The Apprentice Viewership and Attitudes Toward Trump",
          dep.var.caption = "",
          label = "tab3",
          dep.var.labels=c('Support Trump', 'Trump believes // in his policies', 
                           'Trump cares about // people like me', 'Do dot mind // the Billy Bush incident'),
          omit.stat=c("adj.rsq","LL","ser","f"),
          keep.stat = c("n", "rsq"),
          no.space=TRUE,
          omit = c('state', 'female', 'educ4', 'income_n', 'ideo5', 'age', 'trustpoliticians'),
          star.char = c("*", "**", "***"), 
          notes = c("* p<0.05; ** p<0.01; *** p<0.001"), 
          notes.append = F,
          notes.align="l",
          digits=3,
          type='text', 
          align = TRUE)

